<form id="TrackForexForm" action="." method="POST">
    {% csrf_token %}
    <table>
        <tr>
            <td colspan="2">Track record (Forex)</td>
        </tr>
        {% for f in form %}
            {% if f.name == "date" %}
                <tr>
                    <th>{{ f.label_tag }}:</th>
                    <td>
                        {{ f.errors }}
                        <input type="text" name="date_year" readonly="readonly" value="{{ dt.year }}" style="width: 40px; border: solid 1px #ddd; background: #eeeeee; text-align: center;"/>-
                        <input type="text" name="date_month" readonly="readonly" value="{{ dt.month }}" style="width: 40px; border: solid 1px #ddd; background: #eeeeee; text-align: center;"/>-
                        <select name="date_day" style="width: 50px;">
                            {% for d in days %}
                                {% if dt.day == d %}
                                    <option value="{{ d }}" selected="selected">{{ d }}</option>
                                {% else %}
                                    <option value="{{ d }}">{{ d }}</option>
                                {% endif %}
                            {% endfor %}
                        </select>
                    </td>
                </tr>
            {% else %}
                <tr>
                    <th>{{ f.label_tag }}:</th>
                    <td>
                        {{ f.errors }}
                        {{ f }}
                    </td>
                </tr>
            {% endif %}
        {% endfor %}
        <tr>
            <td colspan="2">
                <input type="submit" class="default" value="Save" onclick="OnTrackRecordForexSaveClicked(); return false;" />
            </td>
        </tr>
    </table>
</form>